import service from "../../utils/request";

// 登录方法
export function login(mobile: string, password: string) {
  const data = {
    mobile,
    password
  };
  return service({
    url: "/user/login",
    headers: {
      ContentType: "application/x-www-form-urlencoded",
      isToken: false
    },
    method: "post",
    data: data
  });
}

// 登出方法
export function logout() {
  return service({
    url: "/user/logout",
    method: "get",
    headers: {
      isToken: true
    }
  });
}

